import request from '@/utils/request'

// 查询类型嵌套列表
export function listTypeArticle(query) {
  return request({
    url: '/shop/typeArticle/list',
    method: 'get',
    params: query
  })
}

// 查询类型嵌套详细
export function getTypeArticle(id) {
  return request({
    url: '/shop/typeArticle/' + id,
    method: 'get'
  })
}

// 新增类型嵌套
export function addTypeArticle(data) {
  return request({
    url: '/shop/typeArticle',
    method: 'post',
    data: data
  })
}

// 修改类型嵌套
export function updateTypeArticle(data) {
  return request({
    url: '/shop/typeArticle',
    method: 'put',
    data: data
  })
}

// 删除类型嵌套
export function delTypeArticle(id) {
  return request({
    url: '/shop/typeArticle/' + id,
    method: 'delete'
  })
}

//类型树
export function selectTreeType(){
  return request({
    url: '/shop/typeArticle/selectTree',
    method: 'get'
  })
}
